import { UA } from './ua';

export const randomRange = (min: number, max: number) => {
  return Math.floor(Math.random() * (max - min)) + min;
};

export const randomUA = () => {
  return UA[randomRange(0, UA.length)];
};

export const sleep = (delay: number) => {
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve(true);
    }, delay);
  });
};